const { defineConfig } = require("@vue/cli-service");

module.exports = defineConfig({
  transpileDependencies: true,
  css: {
    loaderOptions: {
      postcss: {
        postcssOptions: {
          // npm i postcss-pxtorem -D
          plugins: [
            [
              "postcss-pxtorem",
              {
                rootValue: 3.75, // 1rem等于多少px
                unitPrecision: 5, // 小数点精确到几位
                propList: ["*"], // 哪些属性需要px转rem
                selectorBlackList: [], // 哪些属性不需要px转rem
                replace: true,
                mediaQuery: false,
                minPixelValue: 0,
                exclude: /node_modules/i,
              },
            ],
          ],
        },
      },
    },
  },
});
